The SystemWeaver API and REST API are powerful tools for interacting with the SystemWeaver server, far surpassing the possibilities of reading and producing data done by a normal user through the SystemWeaver Explorer. To ensure a quality experience for users of the SystemWeaver application as well as to optimize application performance, we strongly recommend the following guidelines for usage of the SystemWeaver API and REST API: 

Performance guidelines:

  • Always use a test server for API application development. Using the production server for testing may impact the performance for connected users and, in the worst case scenario, change or destroy production data.
  • Never allow more than one program to create and/or modify data in the same structure at the same time.

  • Creating/modifying large amounts of data should be done outside of working hours or the amount of write operations per second needs to be restricted so as not to affect the performance for other connected users. Every write operation is communicated to all connected users to keep them in sync, potentially making their applications slow or unresponsive if the server produces large amounts of update messages. If large batch operations must be done during business hours, we highly recommend that you script delays so as to break up the data into smaller batch operations.

  • If the connection to the server has a high latency, the performance of the API application when creating/modifying large amounts of data will be impacted. Make sure that the latency is as low as possible to minimize the execution time for the program.
  • Only applies to the API. Does NOT apply to the Rest API: Stay logged in to the SystemWeaver server if your program reads data from the same structure repetitively. There is no maximum login time and when the application is passive it has no impact on the system. The local cache will improve the performance of your application and reduce the performance impact for the SystemWeaver server. Logging out will clear this cache.

Main vs. Mirror

Applicable to installations utilizing mirrors servers.

  • Depending upon the API programs, those that are primarily reading can be run against a mirror server in the same location as the application
  • Programs that are primarily writing should ideally be run against the main server and be run from the same location as the main server

Coding guidelines:

  • Only applies to the API. Does NOT apply to the Rest API: Do not create or generate classes in your program based on SystemWeaver item, part or attribute types. Types are changed, added and removed over time. This is a natural part of the evolution of a SystemWeaver installation as the organization changes over time. Creating classes for this will make your program hard to maintain. 
  • Do not edit Descriptions that have been created in SystemWeaver using your API program. If they contain Description references, these Description references will be destroyed since the functionality is an extension of the Rich View format. If the descriptions are always edited through your program, this does not apply.