vanishs
I've been developing game backends for several years, using and designing a lot of code. They all about calculations, synchronization with front-end data, and database data, and try to ensure consistency, atomicity, and high response, etc. However, these codes and frameworks have always had problems such as very complicated APIs, incomplete or non-existent ACID, multiple calls to RPC, and non-real-time full or semi-full data landing.
So, we created Lockval Engine. An easy-to-use, ACID, distributed, DOP, multi-language support backend engine.
Here are some online demos that will give you a quicker understanding of Lockval Engine:
[APIdemo] https://apidemo.lockval.com/
[website] https://lockval.com/
github.com/dop251/goja
github.com/yuin/gopher-lua
go.starlark.net
Go scripts (programs) are not subject to any restrictions. So there is no Go script support in the playground(debug)
Just like the functions provided by the playground page, users can fill in any code, so I must ensure that it cannot write functions that can harm the server.
However, someone wants to connect to sql, mongodb, local files, http, etc. Even if it is the same http request function, everyone's needs may be different, so the Go plugin function mentioned above allows users to develop the functions they want. In this way, someone will make a more useful mysql plug-in, someone will make a mongodb plug-in, and so on. If you can't find the function you want, you can also develop one yourself.
Lockval Engine provides a Watch function. Players can watch the UID of a certain map block or the UID of a certain observation point, so that a function similar to the fog of war can be realized.
This demo can be viewed in "Prepare a globalChat struct" and "send A message to globalChat" on the apidemo page. This demo can evolve a variety of similar functions.
Yes, as you said, gw and api in Lockval Engine implement stateless services, db implements ACID for front-end and back-end data, and trigger provides calling methods outside the engine.
So this is a complete closed-loop backend engine. It provides the most basic computing and data synchronization capabilities, and other functions can also be provided to upper-level scripts in the form of plug-ins
Sorry for the very lacking and messy documentation, I'll try to get them out of there as soon as I can. I made apidemo and playground pages, I think these two pages can help you understand how Lockval Engine is used in a more intuitive way. In addition, these two pages can be downloaded locally to build the experience yourself.
I'm also sorry that none of these pages are optimized for mobile, web development is really not my strong point.
But Lockval Engine can easily do all this. Because Lockval Engine is data-oriented programming. It provides a pair of APIs: GetAndLock and PutAndUnlock. You lock the data when you fetch it, and unlock it when you complete the modification.
And this pair of APIs will also synchronize the modified data to the front end. In this way, you don't need to worry about how to send data to the front end when designing functions. Other frameworks or codes need to complete this function by themselves.
Other advantages include but are not limited to: In this distributed architecture, the atomicity of hot update code and configuration. It won't happen that half the system is an old script and half is a new script.
I have been thinking about the most suitable business model for Lockval Engine, such as finding suitable funders.
This is not an issue that needs to be considered recently. Lockval Engine still has many things to do, such as improving the documentation, collecting more feedback and stabilizing the API, and so on.
Lockval Engine is developed around the concept of data-oriented programming. Therefore, it is generally not recommended to use an external database.
The db in Lockval Engine is a bit like redis, which provides hot data in memory and saves changing cold data in real time
Regarding the location of db in Lockval Engine, you can view the architecture diagram on this page: https://lockval.com/docs/
The solution can be found in "Use api.*.so for more functionality" in [apidemo](https://apidemo.lockval.com/)
Go plugin code: https://github.com/lockval/api.so