Are web services processed sequentially or in parallel?


I am just getting started in web services using Lotus Notes. What I would like to be able to do is to create a web service that generates a sequential number. The code to generate the number is based on existing code we have used for some time within our databases (just straight lotus script, no web services). Basically there is a document that stores the next number, the next number is returned and is updated for the next call save conflicts are detected and the number is tried again if there was a issue saving the number.

I thought I might use a web service for to generate the number. So are web services processed sequentially or in parallel? Because if they are serial then I won't need to deal with two people trying to save the number at the same time.


Web services are a way for two systems to communicate with each other where they would not have a common language.

For example LotusScript agent connecting to a .Net server.

When creating a web service provider (server) on Domino you can code it in LotusScript or Java. The server then provides a WSDL file for the consumer (client) to write the code required to talk to that web service.

This tutorial should explain it better for you:

<a href="http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Creating_your_first_Web_Service_provider_and_consumer_in_LotusScript_and_Java." rel="nofollow">http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Creating_your_first_Web_Service_provider_and_consumer_in_LotusScript_and_Java.</a>

Now as for Domino. Web services run in order they are requested from the server. However there is no control to say "Don't start until Webservice X has finished".

You could also code this into an application but run the serious risk of deadlocks of memory/performance issues for other users unless you counter for that.

The Domino server can also be set to not run web services/agents in parallel. But again you risk the same issues.

If it is a unique ID then you could go by the UNID of the document you create from the web service. Or you can use @UNIQUE via an evaluate, but both only return text.

<a href="http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/H_UNIQUE.html" rel="nofollow">http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/H_UNIQUE.html</a>


From the Lotus Designer Documentation:

To enable concurrent Web services on a server, you must enable concurrent Web Agents on that server. Open the Server document you want to edit. Click the Internet Protocols - Domino Web Engine tab. Enable Run Web Agents concurrently.

The maximum number of concurrent Web service calls is determind by "Max concurrent agents"-setting. From the Lotus Administration Documentation:

Max concurrent agents Specifies the number of agents allowed to run concurrently. Valid values are 1 through 10. Default values are 1 for daytime and 2 for nighttime. Enabling a higher number of concurrent agents can relieve a heavily loaded Agent Manager, but also reduces the resources available to run other server tasks.

Lotus Notes Domino Version 8.5.x


Yes web services Will run in parrallel. But since you wrote that your code deals with save conflict, you should NOT have problem.<br /> As in standard notes calls by 2 users: the 1st get the doc then the 2nd get the doc and save (speedy two) then first will get save conflict. In conclusion yes it's parallel BUT it's not a problem.


I would have thought that they would by default run sequentially as asynchronous web agents is off unless you switch it on. So although it's a good design pattern to do 'safe' sequentially number if you only allocate a number via the web service and you haven't changed the asynchronous setting then you'll be fine


Let me also add:

<a href="http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Employ_document_locking_to_assure_number_uniqueness" rel="nofollow">Employ document locking to assure number uniqueness in sequential document numbering solution</a>


There is a simple solution that avoids synchronicity considerations.

You should generate a temporary number using @Unique, then use a scheduled agent to assign sequential numbers in order of document creation, selecting only unprocessed documents using a properly constituted view. If you're not concerned about the order in which documents were created and only concerned that all numbers are unique, a view is not necessary, and you can just trigger the agent on unprocessed documents.

The temporary number can be used for reference temporarily until a proper sequential number is assigned.

When the scheduled agent runs, it should send authors confirmation with the correct reference number.


Or, you could export to DXL and get the sequence= attribute of the tag. This only works if you're accessing a single instance of the database, though. And the DXL export/XML import is a huge amount of overhead.

Unfortunately, I can't see a way to easily get the sequence number of the note from LotusScript NotesDocument. If you have an active support contract, you could open a Problem Management Report for a software enhancement request ("APAR", in IBM's parlance, though I do not know what its acronym expands to).

Good luck!


  • Multiprocessing debug techniques
  • xpages passing the UNID to other field
  • In a SSJS button I have got a NotesViewEntryCollection
  • What are 'best practices' for dealing with transient database errors in a highly concurren
  • How to execute a terminal command in Xamarin.Mac and read-in its output
  • why isn't user-control class access not safe from another thread?
  • GWT Toolkit: preprocessing files on client side
  • Can someone please explain how this implementation of bucket sort works?
  • Where to put clearQueue in jQuery code
  • Slowly changing dimension - What is Pure type 6 implementation
  • Convert symmetric matrix between packed and full storage?
  • SQL append distinct values from two columns and two tables
  • Hibernate: Inheritance and relationship mapping + generics
  • Mongodb update() vs. findAndModify() performace
  • Wait for .each() .getJSON request to finish before executing a callback
  • It is possible use the same sql azure instance from two different cloud service of two different sub
  • Should I use composite primary keys in Grails?
  • How do you create a Fuseki SPARQL server using the Apache Jena Java API?
  • Where these are stored?
  • hibernate sets dirty flag (and issues update) even though client did not change value
  • Do query loads all the data in memory
  • Enabling DTD support in Sql Server
  • SonarQube: Cannot deactivate rule with missing quality profile
  • Spark job failing in YARN mode
  • How to generate and display a QR Code in ionic 2
  • Row Count Is Returning the incorrect number using RaptureXML
  • Atlas images wrong size on iPad iOS 9
  • Is my CUDA kernel really runs on device or is being mistekenly executed by host in emulation?
  • C# - Serializing and deserializing static member
  • DotNetZip - Calculate final zip size before calling Save(stream)
  • Sending data from AppleScript to FileMaker records
  • Can I have the cursor start on a particular column by default in jqgrid's edit mode?
  • jquery mobile loadPage not working
  • How to delete a row from a dynamic generate table using jquery?
  • How to include full .NET prerequisite for Wix Burn installer
  • json Serialization in asp
  • Rails 2: use form_for to build a form covering multiple objects of the same class
  • Benchmarking RAM performance - UWP and C#
  • How to stop GridView from loading again when I press back button?
  • Is it possible to post an object from jquery to bottle.py?