We have a similar system (multi-tenant database) where each tenant (account) has objects that have unique identifiers for that specific account (customers, locations, jobs, invoices, etc).
Customer #C1010 may have 2 locations #L1899 and #L8443 and many invoices #IN1940 and #IN2399 for example.
When we first built the system, I considered using native Postgres sequences to track these, but decided against them because of how they are affected during a rollback. In our system, each account has a record in a table that controls the next value of the sequence.
We have an event in our ORM to automatically generate the next sequence value as part of the transaction so if the transaction is rolled back, the next sequence value is as well. Sure, it requires locking the sequence record but it's a very small table and generating a sequence is quick. We wrapped everything up in a stored procedure named generate_sequence() which returns the next value of the sequence and increments it. It's scaled to millions of records quite well without issue.
Nice - we're using a very similar approach now (procedure that runs just before creation) which I think will last us a good while. Glad to know it's worked out well for you :)
Another added benefit is that you can build a simple interface to allow end users to adjust their sequences (or our support staff in this instance).
In our system, by default, all objects start at 1000. If a new account is created, and they want to increase a sequence to some value (say they already have 5000 invoices in QuickBooks and they want to start all new invoices at 10000 so they know every invoice #IN10000 and higher was created in our system), we have a simple interface that one of our support staff can go to arbitrarily increase the next value.
>We have an event in our ORM to automatically generate the next sequence value as part of the transaction so if the transaction is rolled back, the next sequence value is as well.
I assume that means you also have to only allow one TX to be in-flight at a time adding a new record whose ID is generated from a given sequence?
ServiceLine is a company dedicated to building the best software for residential and commercial contractors. With our small team, we've achieved a great deal of success by leveraging modern software engineering practices and standards. Additionally, our small team and commitment to engineering excellence gives us the ability to iterate rapidly, providing an advantage over our competitors.
We're looking to grow our engineering team with a Senior Backend Engineer. The software you'll be working on is built using PHP and the Symfony framework, backed by PostgreSQL and Redis. ServiceLine also makes heavy use of RESTful APIs for communication with our mobile and frontend apps.
You'll be writing software (and tests) for a production environment, so a keen eye for details and precision is required. Experience with building complex software for a non-technical audience is also a highly desirable trait.
Congratulations on launching. My (small) startup is a Calendly user for our sales and support staff. What would cause me to switch from Calendly to your product?
I would never want to self host this. We're a small team, and no one technical wants to manage yet another server, nor do we want the responsibility for when something screws up and a salesperson misses a demo or a support staff member isn't reminded about a training session.
The pricing isn't that competitive with Calendly ($3/user/month savings) which would translate to a savings of $108 annually for us, not enough to justify switching.
I feel pitching this as an open source alternative to Calendly is the wrong angle. The only people who care about open source are developers who are the least likely people to need scheduling software. And people who do need Calendly aren't going to be moved to switch because Calendly works well enough already.
Finally, the copy at the bottom of the page reads:
> For instance, booking a COVID vaccine shouldn't happen on a server in another country that somebody else is in control of.
Are people using Calendly to book COVID vaccines? If I used your product instead, wouldn't I still be booking a vaccine on someone else's server?
I wish any small competitor success against a large incumbent, but I would radically change my approach to compete against Calendly.
Self Hosting always implies more work, generally its attractive to entities that have data protection requirements. Them offering a hosted alternative is a proven business model (Gitlab for example).
This. I operate in a regulated environment, self-hosting is critical unless I sign a BAA. Even then, I'm risk-averse to allowing PHI to escape the bounds of my sandbox.
I completely agree, especially if you are, like I imagine most HN readers are, already at the top of your professional field.
In 2019, I started training Brazilian Jiu Jitsu. It's had a dramatic improvement on every aspect of my life: health, weight loss, stress relief, mental fortitude, friendships, breathing, everything.
And in starting BJJ, you're going to be _awful_ at it. No matter how athletic you are, you're going to get destroyed (choked or joint locked) many, many, many times by people younger, older, weaker, stronger than you simply because they know more and have better technique. You really truly do start at the bottom.
It's exhilarating. Every day after work (or before), you and a bunch of friends go into a padded room, put on pajamas with a thick belt, and attempt to strangle and/or joint lock one another. You learn new techniques, body mechanics, and actual fighting techniques. When you're rolling with someone else, literally every other stress in the world melts away as you're trying to stop your opponent from submitting you while you're trying to submit them. It truly is physical chess, and there's nothing better than switching from the drudgery of a job to a night of martial arts.
Not the OP, but I visited the Stripe HQ back when they were around 50 people and they had a full time chef on staff. I spent an afternoon with them, which included a free lunch.
I had the same thought when my 10 year old showed me the games he plays on Roblox. Absolutely awful graphics, gameplay, "story", etc, but they are _obsessed_ with them.
On the other hand the graphics are simple enough that it runs smoothly on phones, tablets, and hand-me-down computers from the mid-2000s, which is what many kids are running.
It's gotten my eldest son into Lua programing and 3D modelling, so I have no problems with the platform as it currently is.
A few of the games/servers were interesting: Phantom Forces was a reasonably well polished FPS, and the Murder Mystery games (sneaky murderer vs sheriff and villagers, typical social deduction/betrayal game) were pretty fun.
Hoping it doesn't get completely and totally overrun with ads.
I think part of it (as some other comments have alluded to) is that maybe the low quality production brings the kids closer to it because they feel like they could possibly build something if they wanted to. Or that someone like them built the game they are playing. It’s perhaps more relatable than some ultra polished AAA title.
Not even just a feeling - they really can build these experiences themselves. I just watched our 5-year old kitbash together a city full of cars in about 4 hours, which is now online for anyone to visit.
I find the platform very appealing even as an adult, as you can script in Lua, and then watch as hundreds of visitors interact with what you just wrote. This week I hacked the Bad Apple music video to run on Roblox, and then had a great time seeing people react to it.
Wow. Thank you for making that connection in my mind. I spent a lot of hours with Flash games growing up but have struggled to understand why teens like Roblox or mobile games so much.
So like flash games that a lot of us grew up with then. There is a lot to be said when the games load in seconds so you can jump from game to game and the novelty value is high.